using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using TimeTableManagement.Entities;

namespace TimeTableManagement.Mapping
{
	public class Tb_SlotMap : EntityTypeConfiguration<Tb_Slot>
	{
		public Tb_SlotMap()
		{
			// Primary Key
			this.HasKey(t => t.id);

			// Properties
			this.Property(t => t.slot)
				.HasMaxLength(50);
				
			this.Property(t => t.note)
				.HasMaxLength(255);
				
			// Table & Column Mappings
			this.ToTable("Tb_Slot");
			this.Property(t => t.id).HasColumnName("id");
			this.Property(t => t.slot).HasColumnName("slot");
			this.Property(t => t.to).HasColumnName("to");
			this.Property(t => t.from).HasColumnName("from");
			this.Property(t => t.note).HasColumnName("note");
		}
	}
}

